package com.browse.task;

import com.browse.mapper.BrowseRecordMapper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author 路亚
 * @version 0.1
 * @className CreateTableTask
 * @description
 * @date 2024/12/29 17:14
 * @since jdk11
 */
@Component
@RequiredArgsConstructor
public class CreateTableTask {

    private final BrowseRecordMapper browseRecordMapper;

    @XxlJob("createTable")
    public void createTable() {
        String format = LocalDateTime.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyyMMdd"));

        browseRecordMapper.createTable(20241231);
    }
}
